Time series database processing system

ABSTRACT

Systems and methods are provided for improved time series databases and time series operations. A time series service responds to requests from external devices. The external devices request time series data and submit time series queries. The time series service generates planned and efficient time series queries from the initial queries. The time series service performs operations such as unit conversion, interpolation, and performing operations on time series data. The time series service can identify which time series database to query from and/or cause data to be populated into a time series database from a data pipeline system.

INCORPORATION BY REFERENCE TO ANY PRIORITY APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/535,575 entitled “Time Series Database Processing System” filed onAug. 8, 2019, which is a continuation of U.S. patent application Ser.No. 15/831,188 entitled “Time Series Database Processing System” filedon Dec. 4, 2017, now U.S. Pat. No. 10,417,224, which claims benefit ofU.S. Provisional Patent Application Ser. No. 62/545,036 entitled “TimeSeries Database Processing System” filed Aug. 14, 2017, which is herebyincorporated by reference in its entirety.

Any and all applications for which a foreign or domestic priority claimis identified in the Application Data Sheet as filed with the presentapplication are hereby incorporated by reference under 37 CFR 1.57.

BACKGROUND

A database may store a large amount of time series data.

SUMMARY

The systems, methods, and devices described herein each have severalaspects, no single one of which is solely responsible for its desirableattributes. Without limiting the scope of this disclosure, severalnon-limiting features will now be discussed briefly.

According to an embodiment, a system is disclosed comprising: a timeseries database configured to store a first time series and a secondtime series; a non-transitory computer storage medium configured tostore metadata associated with a time series; and one or more hardwarecomputer processors programmed, via executable code instructions, toimplement a time series service to: receive a time series requestcomprising a first time series expression, the first time seriesexpression comprising a first time series indicator; retrieve, from thenon-transitory computer storage medium, metadata using the first timeseries indicator; generate a second time series expression using themetadata and the first time series expression; retrieve, from the timeseries database, the first time series and the second time series;perform, according to the second time series expression, an operation onfirst data associated with the first time series and second dataassociated with the second time series to generate third data; andtransmit the third data.

According to an aspect, the first time series expression may furthercomprise a plurality of nodes, wherein each node of two or more of theplurality of nodes correspond to a time series operation.

According to another aspect, generating the second time seriesexpression may further comprise: identifying two or more of theplurality of nodes that correspond to the time series operation; andgenerating a combined operation node from the two or more of theplurality of nodes, wherein the second time series expression comprisesthe combined operation node instead of the two or more of the pluralityof nodes.

According to yet another aspect, the first time series expression mayfurther comprise an indicator for the operation, wherein thenon-transitory computer storage medium is further configured to store:first metadata comprising a first association between the first timeseries and a first time unit, and second metadata comprising a secondassociation between the second time series and a second time unit, andwherein the one or more computer hardware processors are furtherconfigured to at least: determine, using the first metadata and thesecond metadata, that the first time unit and the second time unit aredifferent; determine that the second time unit is more granular than thefirst time unit; identify a first set of timestamps from the first timeseries and a second set of timestamps from the second time series;identify, from the second set of timestamps, a second subset oftimestamps that correspond to a granularity of the first second timeunit; generate a normalized set of timestamps from the first set oftimestamps and the second time unit; generate, from the first timeseries and the normalized set of timestamps, a first normalized dataset; and generate, from the first second time series and the firstsecond set of timestamps, a first second data set; generate, from thesecond time series and the second subset of timestamps, a secondinterpolated data set, wherein the first data comprises the firstnormalized data set, the second data comprises the second interpolateddata set, and the third data comprises a third time series.

According to yet another aspect, generating the normalized set oftimestamps from the first set of timestamps and the second time unit mayfurther comprise: applying a time scaling function to each timestampfrom the first set of timestamps, wherein the time scaling functionconverts a timestamp from the first time unit to the second time unit.

According to yet another aspect, the time scaling function may compriseat least one of a multiplication operation or a division operation.[0011] According to yet another aspect, the first time series expressionmay further comprise an indicator for the operation, wherein thenon-transitory computer storage medium is further configured to store:first metadata comprising a first association between the first timeseries and a first time unit, and second metadata comprising a secondassociation between the second time series and a second time unit, andwherein the one or more computer hardware processors are furtherconfigured to at least: determine, using the first metadata and thesecond metadata, that the first time unit and the second time unit aredifferent; determine that the second time unit is more granular than thefirst time unit; identify a first set of timestamps from the first timeseries and a second set of timestamps from the second time series;identify, from the second set of timestamps, a second subset oftimestamps that correspond to a granularity of the first time unit;generate, from the first time series and the first set of timestamps, afirst data set; generate, from the second time series and the secondsubset of timestamps, a second interpolated data set, wherein the firstdata comprises the first data set, the second data comprises the secondinterpolated data, and the third data comprises a third time series.

According to another aspect, the first time series expression mayfurther comprise a second time series indicator for a third time series,and wherein the one or more computer hardware processors are furtherconfigured to at least: determine that a second time series is notpresent in the time series database; cause the data pipeline system tostore, in the time series database, the third time series; and store, inthe non-transitory computer storage medium, third metadata comprising athird association between the third time series and the third time unit.

According to yet another aspect, the time series request may furthercomprise an interpolation configuration parameter that indicate a typeof interpolation to be performed.

According to another aspect, the first time series expression mayfurther comprise an indicator for an operation, the operation comprisingat least one of: an addition operation, a subtraction operation, adivision operation, a multiplication operation, a ratio determinationoperation, a square root operation, a zScore operation, a standarddeviation operation, an average operation, a median operation, a mode ofoperation, a range operation, a maximum operation, or a minimumoperation.

According to another embodiment, a method for a time series service isdisclosed comprising: receiving a time series request comprising a firsttime series expression, the first time series expression comprising afirst time series indicator; retrieving, from a non-transitory computerstorage medium, metadata using the first time series indicator;generating a second time series expression using the metadata and thefirst time series expression; retrieving, from a time series database, afirst time series and a second time series; performing, according to thesecond time series expression, an operation on first data associatedwith first time series and second data associated with the second timeseries to generate third data; and transmitting the third data, whereinthe method is performed by a hardware computer processor

According to an aspect, the first time series expression may furthercomprise a plurality of nodes, wherein each node of two or more of theplurality of nodes correspond to a time series operation.

According to another aspect, generating the second time seriesexpression may further comprise: identifying the two or more of theplurality of nodes that correspond to the time series operation; andgenerating a combined operation node from the two or more of theplurality of nodes, wherein the second time series expression comprisesthe combined operation node instead of the two or more of the pluralityof nodes.

According to yet another aspect, the method may further compriseretrieving, from the non-transitory computer storage medium, firstmetadata comprising a first association between the first time seriesand a first time unit, and second metadata comprising a secondassociation between the second time series and a second time unit;determining, using the first metadata and the second metadata, that thefirst time unit and the second time unit are different; determining thatthe second time unit is more granular than the first time unit;identifying a first set of timestamps from the first time series and asecond set of timestamps from the second time series; generating anormalized data set from the first time series and the second time unit,the first data comprising the normalized data set.

According to yet another aspect, the method may further compriseretrieving, from the non-transitory computer storage medium, firstmetadata comprising a first association between the first time seriesand a first time unit, and second metadata comprising a secondassociation between the second time series and a second time unit;determining, using the first metadata and the second metadata, that thefirst time unit and the second time unit are different; determining thatthe second time unit is more granular than the first time unit;identifying a first set of timestamps from the first time series and asecond set of timestamps from the second time series; identifying, fromthe second set of timestamps, a second subset of timestamps thatcorrespond to a granularity of the first time unit; generating, from thefirst time series and the first set of timestamps, a first data set; andgenerating, from the second time series and the second subset oftimestamps, a second interpolated data set, wherein the first datacomprises the first data set, the second data comprises the secondinterpolated data, and the third data comprises a third time series.

According to another aspect, the first time series expression mayfurther comprise a second time series indicator for a third time series,further comprising: determining that a second time series is not presentin the time series database; causing the data pipeline system to store,in the time series database, the third time series; and storing, in thenon-transitory computer storage medium, third metadata comprising athird association between the third time series and the third time unit.

According to yet another aspect, the time series request may furthercomprise an interpolation configuration parameter that indicate a typeof interpolation to be performed.

Various combinations of the above and below recited features,embodiments and aspects are also disclosed and contemplated by thepresent disclosure.

Additional embodiments of the disclosure are described below inreference to the appended claims, which may serve as an additionalsummary of the disclosure.

In various embodiments, systems and/or computer systems are disclosedthat comprise a computer readable storage medium having programinstructions embodied therewith, and one or more processors configuredto execute the program instructions to cause the one or more processorsto perform operations comprising one or more aspects of the above-and/or below-described embodiments (including one or more aspects of theappended claims).

In various embodiments, computer-implemented methods are disclosed inwhich, by one or more processors executing program instructions, one ormore aspects of the above- and/or below-described embodiments (includingone or more aspects of the appended claims) are implemented and/orperformed.

In various embodiments, computer program products comprising a computerreadable storage medium are disclosed, wherein the computer readablestorage medium has program instructions embodied therewith, the programinstructions executable by one or more processors to cause the one ormore processors to perform operations comprising one or more aspects ofthe above- and/or below-described embodiments (including one or moreaspects of the appended claims).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a time series service, accordingto some embodiments of the present disclosure.

FIG. 2 illustrates an example graphical user interface for presentationand/or interaction with one or more time series, according to someembodiments of the present disclosure.

FIGS. 3A-3B illustrate diagrams of example time series requests and timeseries expressions, according to some embodiments of the presentdisclosure.

FIG. 4 is a flowchart of a method for processing and responding to timeseries requests, according to some embodiments of the presentdisclosure.

FIGS. 5A-5I illustrate example time series data, time seriesinterpolation, and/or time series normalization, according to someembodiments of the present disclosure.

FIG. 6 is a flowchart of a method for time series interpolation,according to some embodiments of the present disclosure.

FIG. 7 is a flowchart of a method for efficient time series expressiongeneration and/or execution, according to some embodiments of thepresent disclosure.

FIG. 8 is a flowchart of a method for efficient location of time seriesdata, according to some embodiments of the present disclosure.

FIG. 9 is a block diagram illustrating an example time series servicewith which various methods and systems discussed herein may beimplemented.

DETAILED DESCRIPTION Overview

A time series database can be queried. The time series database mayinclude time series data captured from one or more sensors. A systemthat allows users to analyze time series data may include a databaseserver and a user computing device. The user computing device mayprovide information to the database server regarding the type ofanalysis desired by the user. The database server may retrieve theappropriate data from the database, perform the analysis, and providethe results to the user device for display. The user may attempt toanalyze a single set of time series data (for example, data measured bya single sensor and/or captured from a single data source over a periodof time) or multiple sets of time series data (for example, datameasured by multiple sensors and/or captured from multiple data sourcesover a period of time). The time series data may be associated with oneor more time units and/or the time series data may be stored at aparticular frequency, such as 50 or 60 hertz. Such analysis may includeviewing the time series data at different periods of time, viewing thetime series data at different zoom levels, simultaneously viewingdifferent time series data over the same time period, combining (forexample, adding, subtracting, dividing, multiplying, determining aratio, determining a zScore, determining a square root, etc.) differenttime series data to generate new time series data.

Disclosed herein are systems and methods that may be used toadvantageously improve time-series-related functionality. A time seriesservice may receive and respond to requests from external applicationsand/or libraries on behalf of one or more time series databases and/ordata pipeline systems. The time series service may function as amiddleware layer. The time series service may receive initial timeseries queries and may generate planned queries from the initialqueries. The planned queries may efficiently query the one or more timeseries databases and/or data pipeline systems. The time series servicecan enable time series operations between time series data sets ofdifferent units by automatically performing interpolation and/ornormalization. The time series service can also identify which ofmultiple time series databases to query based on efficiency and/ortrigger population or hydration of time series data from a data pipelinesystem if the data is missing in a database.

The systems and methods described herein may improve computer-relatedtechnology. Despite substantial advances in computer processing powerover the past years, some time-series-related computing tasks may stilltake impractically long amounts of time, especially when many gigabytes,terabytes, petabytes, or exabytes of data are involved. In someembodiments, a time series service may improve a time series system, atime series database, and/or graphical user interfaces for viewingand/or interacting with time series. A time series service may act as amiddleware layer between an external requesting device, such as agraphical user interface and/or a library, and a time series database.Accordingly, a time series service can handle computational processingthat may otherwise have to be performed by a front-end or backendsystem. Thus, time-series-related processing may be offloaded to thetime series service which may enable the front-end or backend systems toperform less computational processing, have a lighter hardwarefootprint, and/or have less application logic.

A time series service may result in faster and/or more efficientresponses to time series requests and/or queries. The time seriesservice can receive a time series request that includes a time seriesexpression. A time series system may respond to the time series requestby executing the time series expression. However, the time seriesexpression as originally submitted may be inefficient. In someembodiments, the time series service can rewrite and/or generate a newtime series expression from the original time series expression.Execution of a new time series expression may advantageously result in afaster processing time and/or use less computing resources thanexecution of the originally submitted time series expression, which mayimprove computer-related technology.

A time series service may include logic or instructions that improvetime series databases. A time series service can include logic thatenables time series expressions to be applied to time series that havedifferent time units and/or that correspond to data that is stored atdifferent frequencies, such as, 60 hertz or 60 times a second incontrast to 50 hertz or 50 times a second. In some time series systemsthat do not include a time series service, if a time series databaseincluded time series data in different time units or in differentfrequencies, the time series system may be required to re-ingest thetime series data into a common time unit, which may be computationallyexpensive and/or may require larger data storage. Thus, some time seriesservice embodiments can handle time series requests that are related totime series of different time units that allows the underlying timeseries data to be efficiently stored in different time units.

The systems and methods described herein may be intrinsically tied todatabase and/or computer technology because such solutions may berelated to communication over computer networks, Application ProgrammingInterfaces, data processing, and/or time-series technology. The dataprocessing techniques and solutions described herein may beintrinsically tied to time series databases. Thus, the processes forefficiently servicing time series requests and/or queries may beintrinsically tied to database technology.

Example Time Series Service Overview

FIG. 1 illustrates a time series service 100, according to someembodiments of the present disclosure. In the embodiment of FIG. 1 , thedatabase environment 111 can include a network 160, a time seriesservice 100, a user computing device 102, a library 104, an alertingservice 105, one or more time series databases 132, and a data pipelinesystem 134. Various communications between these devices areillustrated. For example, the user computing device 102 may send userinput, such as time series queries and/or expressions generated fromuser interface selections, to the time series service 100. The usercomputing device 102 may enable a user to interact with time series datausing a graphical user interface, such as the graphical user interface200 of FIG. 2 . Additionally or alternatively, the user computing device102 may present a time series report. The time series reportpresentation system may communicate with the time series service 100 toretrieve and present time series data.

The time series service 100 can include a communication interface 106, aquery executor 108, metadata storage 110, and a backend interface 112.The communication interface 106 can receive time series requests from atleast one of the user computing device 102 and/or the library 104. Anexample library 104 is a software library, such as Python, forperforming time series operations. A programmer can write custom timeseries algorithm using the library 104. The time series requests can beprocessed by the time series service 100. The query executor 108 canprocess the requests. Example processing includes generating efficienttime series expressions, dynamically converting time series data,identifying which time series databases to query, causing time seriesdata to be populated in one or more time series databases, and/or otheroperations as described herein. In processing the time series requests,the query executor 108 may access the metadata storage 110, which maystore metadata such as the respective units for time series data. Thequery can execute one or more queries and/or backend requests via thebackend interface 112. The backend interface 112 can transmit thegenerated queries and/or backend requests to the one or more time seriesdatabases 132 and/or the data pipeline system 134 and receive responsesfrom the backend systems. In responding to a time series request, thetime series service 100 may execute multiple queries, as describedherein, to generate the final results for a response. The responses canbe transmitted to the communication interface 106, which may furthertransmit to the user computing device 102 and/or the time serieslibrary. Additionally or alternatively, the backend responses may betransmitted to the query executor 108 for further processing before theresponse data is transmitted to the user computing device 102 and/or thetime series library.

In some embodiments, a data pipeline system 134 is a workflow systemthat can store data in one or more time series databases. For example,the data pipeline system 134 can receive and/or process time seriesdata, such as data collected by one or more sensors. The data pipelinesystem 134 can access a data source and perform nested transformationsto modify and/or format time series data that can be stored in one ormore time series databases. As described herein, measurements may becollected from one or more sensors. The data source may have the timeseries data in a raw format and the data pipeline system 134 can accessthe data source to process, format the data, and/or store the data intoone or more time series databases.

The metadata storage 110 stores metadata regarding time series, such asthe units of time series. In some embodiments, a time series database132 may not include one or more units of a time series. For example, thetime series database 132 stores a series of (timestamp, value) pairs,which may not necessarily include data indicative of a particular timeunit or other unit for the series. In other embodiments, the time seriesdatabase 132 may store data indicative of the time unit for a timeseries. For example, a time series may be stored in the time seriesdatabase 132 in a particular time unit. In some embodiments, the timeseries service 100 can include a metadata service (not illustrated inFIG. 1 ). The metadata service can access the metadata storage 110 toprovide metadata regarding one or more time series.

In some embodiments, the alerting service 105 and communicate with thetime series service 100. The alerting service 105 can submit time seriesrequests to the time series service 100. The alerting service 105 canrepeatedly submit time series requests. The alerting service 105 caninclude logic to generate alerts if the retrieved time series datasatisfies one or more conditions. An example condition includes some ofthe time series data exceeding a threshold. The alerting service 105 canthen generate and/or transmit a corresponding notification. Thus, thetime series service 100 acting as a middleware layer can enable improvedalerting.

Example Time Series Requests

As described herein, an external device may transmit requests to thetime series service 100 through a graphical user interface and/or alibrary. FIG. 2 illustrates a user interface 200 that depicts graphs oftime series data that may be generated and displayed by a computingdevice, such as the user computing device 102 of FIG. 1 . A userinteraction with the user interface 200 may cause requests be sent tothe time series service 100.

In FIG. 2 , the user interface 200 includes a first graph 210 and asecond graph 220. The user interface 200 can enable a user to retrievetime series data, query and/or find a time series, view time series dataat different periods of time, view time series data at different zoomlevels, and/or simultaneously view different time series data over thesame time period. In a vehicle sensor context, a user can investigatefuel consumption over time for one or more vehicles using the userinterface 200. In the user interface 200, the user can then further zoomin on fuel consumption data generated from a particular fuel pump. Othertime series contexts include any situation where a physical device, suchas mechanical hardware, can be monitored and measurement data cancollected. An example first graph 210 corresponds to time series datafor water allocation values over time. An example second graph 220corresponds to time series data for temperature values over time.

FIGS. 3A-3B illustrate diagrams of example time series requests and timeseries expressions. In FIG. 3A, the data environment 300 can include atime series request 310 and a generated time series expression 314. Thetime series requests 310 can be generated and/or sent from the usercomputing device 102 and/or the library 104 of FIG. 1 . The time seriesrequest 310 can include a time series expression 312 and one or moreparameters 314. As described herein, example one or more parameters 314are interpolation configuration parameters that indicate a type ofinterpolation to be performed. Example types of interpolation aredescribed in further detail with respect to FIGS. 5A-5G. Theinterpolation configuration parameter can instruct how the time seriesservice 100 should perform interpolation. An example, but not limiting,data format for the time series request 310 is a JavaScript ObjectNotation (JSON) data format.

As illustrated, the time series request 310 and/or the time seriesexpression 312 may be nested. For example, the time series request 310and/or the time series expression 312 can include two or more nodes thatmay be linked. The two or more nodes of the time series of request 310may be in a tree format. Example nodes include nodes that correspond toone or more time series operations, a combined operation, a query,and/or one or more time series, such as one or more time seriesindicators. Example operations can include mathematical operations, suchas, but not limited to, an addition operation, a subtraction operation,a division operation, a multiplication operation, a ratio determinationoperation, and/or a square root operation; statistical operations, suchas, a zScore operation, a standard deviation operation, an averageoperation, a median operation, a mode of operation, and/or a rangeoperation; and/or other functions including, but not limited to, amaximum operation, a minimum operation, and/or customized functions suchas user-defined functions. An example time series indicator can includean identifier, such as a numerical and/or string identifier, thatreferences a particular time series. The time series request 310 can bein a nested JSON data format. The time series expression 312 candescribe the request that the time series service 100 may respond to. Insome embodiments, the time series service 100 and/or the time seriesdatabase 132 queries time series data and/or performs one or moreoperations as represented by the time series expression 312. However,the time series service 100 may optionally generate a new time seriesexpression to be performed instead of the original time seriesexpression since the new time series expression may be more efficientthan the original time series expression.

The time series expression 312 can include multiple operations, such asa first operation, a second operation, a third operation, etc. Asillustrated, a first operation 305A may be an arithmetic operation andmay indicate the addition of data values from a first time series asreferenced by the first time series indicator 302B (such as the timeseries data displayed in the graph 210 of FIG. 2A) with data values froma second time series as referenced by the second time series indicator304 (such as the time series data displayed in the graph 220 of FIG.2A). The second operation may be another arithmetic operation 305B andmay indicate the division of data values from the first time series asreferenced by the time series indicator 302A (such as the time seriesdisplayed in the graph 210 of FIG. 2A) over the results from the firstoperation. A new set of time series data 306 may be the output of theevaluation of the time series expression 312. The time series service100 may evaluate the time series expression 312 and may return the timeseries data 306. The time series data 306 may be presented in a userinterface, such as the user interface 200 of FIG. 2 , such as in one ofthe graphs 210 or 230, and/or another graph of the user interface 200.While two arithmetic operations are depicted, this is not meant to belimiting. A time series expression may include any number of nested orun-nested operations. Further, while the description of FIG. 3 issometimes with respect to presented time series data, in otherembodiments time series expressions are evaluated on time series datathat may not be presented, such as being invoked by a library. In someembodiments, the user may request a display of a graph of time seriesdata that may only be produced by execution of a time series expressionon two or more time series. As a result, the time series service 100 mayretrieve the necessary time series data, execute the time seriesexpression, and then provide the requested time series data to thedevice that submitted the request.

In some embodiments, the time series service 100 can rewrite and/orgenerate a new time series expression from the time series expressionthat was submitted in the time series request. Execution of a new timeseries expression may advantageously result in a faster processing timeand/or use less computing resources than execution of the originallysubmitted time series expression. The time series service 100 can use anoptimizer to process the submitted time series expression to generate amore efficient time series expression. The time series service 100 cangenerate a new time series expression using metadata associated with oneor more time series referenced in the original time series expression.For example, the metadata may indicate which data sources where the timeseries data exists and/or can be retrieved.

An example method for generating a more efficient time series expressionis to reduce a number of nodes in the time series expression. The timeseries service 100 can identify two or more nodes in the time seriesexpression that correspond to a time series operation. In the example,the nodes 305A and 305B corresponds to the time series operations ofaddition and division. The time series service 100 can generate acombined operation node from the identified two or more nodes. Anexample combined operation node is the node 307, which can representboth the addition and division operations in a single node to therespective input time series. In some embodiments, less nodes in thetime series expression may be more efficient for the time series service100 and/or the backend, such as the one or more time series databases.For example, instead of intermediary processing nodes, the data and/oroperations can be pipelined into a node that results in fasterprocessing and/or the use of less computational resources. Further,combining computations, such as arithmetic, into a node may also befurther efficient. Accordingly, the time series service can generate thetime series expression 314 from the original time series expression 312,which may be rewritten in a form to be more efficient.

FIG. 3B illustrates a diagrams for another time series request. In FIG.3B, the data environment 320 can include a time series request 322. Thetime series of request 322 may enable efficient querying of time seriesdata and/or performing one or more operations on the time series data. Atime series request may explicitly include references to multiple timeseries and respective time series expression. However, in someembodiments, instead of including the explicit references to each ofmultiple time series, a more efficient time series expression mayinclude a node query that can be executed by the time series service 100to generate a fully planned time series expression.

As described herein, the time series service 100 may be applied in acontext where sensors collect time series data. An example contextincludes time series data collected from vehicles, such as cars, planes,boats, or trucks. In a trucking example, a request may be generallydirected towards determining a maximum speed of multiple shipping trucksalong a particular shipping route, such as from Los Angeles, Calif. toPortland, Oreg. In one example, a user may use a graphical userinterface to pull back a list of deliveries between LA and Portland,which may result in 100 time series being returned to the graphical userinterface. Accordingly, while not illustrated, a corresponding timeseries requests may include a time series expression with 100 timeseries nodes corresponding to the retrieved 100 time series.

However, in contrast to the previous example, a graphical user interfaceof FIG. 3B may instead send the time series request 322. The time seriesrequest 322 includes a time series expression 324 and one or moreparameters 325. As illustrated, instead of including the 100 nodes ofthe previously example, the time series expression 324 can include aquery node 326 and a time series operation node 328. The query node 326can include instructions that are associated with a particular query. Inthe example, the query node 326 corresponds to those time series fordeliveries between LA and Portland. Example instructions of the querynode 326 may correspond to the following pseudocode: “SELECT [TIMESERIES DATA] FROM DELIVERIES WHERE (SOURCE=‘LOS ANGELES’ ANDDESTINATION=‘PORTLAND’) OR (SOURCE=‘PORTLAND’ AND DESTINATION=‘LOSANGELES’),” which can result in nodes representing the 100 time seriesdescribed above. Accordingly, the time series service 100 can executethe query node 326 and retrieve the corresponding data instead of havingto transmit the initial time series data to the requesting device, whichmay reduce network bandwidth and/or reduce or offload computerprocessing from the requesting device. The retrieved corresponding datacan include identifiers corresponding to the 100 time series nodes. Thetime series service 100 and/or a time series database can apply the timeseries operation corresponding to the node 328 to the results from thequery node 326 that generates the output 330. Example output 330includes one or more data values or time series. In the example, thetime series service 100 determines a maximum speed from each of theretrieved 100 time series that results in the output data values 330.Accordingly, the time series service 100 may execute multiple queriesagainst the time series database to respond to a time series request.Thus, the time series service 100 may in effect rewrite the time seriesexpression 324 to be similar to the time series expression 314 of FIG.3A. For example, the rewritten time series expression may includemultiple time series nodes (here, 100 time series nodes) connected to anoperation node (here, a maximum node).

Example Time Series Service Process

FIG. 4 is a flowchart of a method for processing and responding to timeseries requests, according to some embodiments of the presentdisclosure. Although the method 400 is described in conjunction with thesystems of FIG. 1 , any system configured to perform the method, in anyorder, is within the scope of this disclosure. The method 400 may beperformed by the various components of the time series service 100 ofFIG. 1 as discussed herein, including the communication interface 106,the query executor 108, and/or the backend interface 112. Depending onthe embodiment, the method 400 may include fewer or additional blocksand/or the blocks may be performed in an order different than isillustrated. Blocks of the method 400 may be similar to blocks of anyother method described herein. The techniques and/or algorithms of ablock of the method 400 may describe the techniques and/or algorithmsthat can be used at a block of any other the method described herein.Additionally or alternatively, the method 400 may be combined with anyother method described herein.

Beginning at block 402, the communication interface 106 receives a timeseries requests. As described herein, a time series requests may bereceived from a user computing device 102 and/or a library 104. Anexample library is a software library that can communicate with the timeseries service. In some embodiments, the communication interface 106implements an Application Programming Interface (API) to receiverequests. A time series requests can include one or more times seriesidentifiers, one or more operations, a time series expression, and/orother parameters.

At block 404, the query executor 108 processes the time series ofrequest. Processing of the time series of request can include the queryexecutor 108 retrieving metadata from the metadata storage 110 for theone or more time series identified in the request. Additional oralternative processing of the time series of request can includeidentifying where the time series data is located and/or causing thetime series data to be populated in a data source, as described infurther detail herein.

At block 406, the query executor 108 generates a time series query. Thetime series query can include a time series expression. The queryexecutor 108 can generate a new time series expression from the timeseries expression from the request. The query executor 108 may use someof the results from the previous block 404 to generate the time seriesquery. For example, the query executor 108 can use the time seriesmetadata, such as a respective time unit, to generate the time seriesquery. In another example, the query executor 108 can specify the datasource to query the time series data based on one or more factors: suchas the presence or existence of the time series in the data sourceand/or a determination that multiple time series are located in aparticular data source. The query executor 108 may further generate anefficient query, as described in further detail herein.

At block 408, the query executor 108 executes the generated time seriesquery via the backend interface 112. The backend interface 112 canexecute the time series query and can retrieve time series data.

At block 410, the query executor 108 processes the time series resultsto generate time series data. Example processing of results by the queryexecutor 108 includes applying operations to the retrieved results, suchas applying one or more arithmetic operations. In other embodiments, thetime series database performs one or more operations. The query executor108 can process time unit conversions of time series data sets ofdifferent time units. The query executor 108 can interpolate time seriesdata, such as when time series data is combined according to a timeseries expression. The query executor 108 can process the times seriesresults to generate time series data, such as a data value and/or a newtime series. In some embodiments, the time series service 100 supportsstoring the generated time series data with an identifier. Accordingly,a subsequent time series request can include the identifier to referencethe stored time series data.

At block 412, the communication interface 106 transmits the time seriesdata. In some embodiments, the transmission of the time series occursvia the API.

Example Time Series Interpolation And/or Normalization Processes

The time series data in the time series database 132 may not be in astate where the time series expression can be applied. Thus, the timeseries service 100 can generate new data from the existing time seriesdata where the new data is in a state that is compatible with the timeseries expression. The time series service 100 can performinterpolation. As used herein, in addition to having its ordinary andcustomary meaning and/or any other implied meaning and in addition tobeing construed broadly, the term “interpolation” refers to thegeneration of a set of values from a first set of values. Interpolationcan include an estimation of a value within two known values in asequence of values. Interpolation can further include determining asubset of values from a set of values. As described herein, a first setof values for a first time series may be incompatible with a second setof values for a second time series. For example, there may be morevalues in the second set than the first set. Thus, the time seriesservice 100 can perform an example method interpolation by determining asubset of the second set of values that is compatible with the first setof values. The time series service 100 can perform data normalization. Afirst set of values for a first time series may be incompatible with asecond set of values for a second time series based on the time unit ofeach respective time series. The time series service 100 can perform anexample method data normalization by applying a scaling factor to one ormore of the time series.

FIGS. 5A-5G illustrate example time series data and/or time seriesinterpolation. In FIG. 5A, the data environment 500 includes a firsttime series 502 and a second time series 506. The first time series 502includes at least the data values 504A, 504B, 504C, 504D, and 504E atthe timestamps A, B, C, D, and E, respectively. The timestamps A, B, C,D, and E of the first time series 502 and/or the timestamps of thesecond time series 506 can correspond to hours, minutes, seconds,milliseconds, microseconds, nanoseconds, or any other time unit orinterval. The second time series 506 includes at least the data values508A, 508B, 508C, 508D, 508E, 508F, 508G, 508H, and 508I at thetimestamps A, A′, B, B′, C, C′, D, D′, and E. As shown in FIG. 5A, thetimestamps A, A′, B, B′, C, C′, D, D′, and E represent any kind oftimestamp and do not correspond to any specific timestamp format. Forexample, the timestamp A can correspond to a first millisecond and thetimestamp A′ can correspond to a second millisecond. In another example,the timestamp A can correspond to a time 0 and the timestamp A′ cancorrespond to a 0.5 seconds.

As described herein, the time series service 100 processes requests thatcan include time series expressions referencing one or more timesseries. Thus, a time series expression can include references to thefirst time series 502 and the second time series 506 to perform anoperation on the times series 502 and 506. However, the second timeseries 506 as shown may include more data values than the first timeseries 502. Accordingly, the time series service 100 may modify one ormore of the time series 502 and 506 for the one or more time series tobe in a compatible format for one or more operations.

In FIG. 5A, the stored timestamps of the first time series 502 can be ina first time unit, such as, but not limited to, hours, minutes, seconds,milliseconds, microseconds, nanoseconds. The stored timestamps secondtime series 506 can be in a second time unit, which can be differentfrom the first time unit. In other embodiments, the first time series502 is stored at a first frequency, such as 50 hertz or 50 times persecond, and the second time is stored at a second frequency, such as 100hertz or 100 times per second. The second time unit or the secondfrequency can be more granular than the first time unit. For example,the first time unit can be seconds and the second time unit can bemilliseconds or microseconds. Thus, the second time series 506 caninclude more data values than the first time series 502, since the dataof the second time series 506 was recorded at a greater granularity. Inother embodiments, the respective time units of the time series 502 and506 may be the same, but the frequency of recordation of the second timeseries 506 may be greater than the frequency of recordation for thefirst time series 502. For example, the second time series 506 mayinclude data values at 2 second intervals in contrast to the first timeseries 502 that may include data values at 1 second intervals.

FIG. 5B illustrates additional time series data. In FIG. 5B, the dataenvironment 500 includes the first time series 502 and another timeseries 507. Some of the time series data of FIG. 5B may be similar tothe time series data of FIG. 5A. For example, the first time series 502of FIG. 5B may be the same as the first time series of FIG. 5A. The timeseries 507 may represent a data set that is generated from the timeseries 506 of FIG. 5B. The time series 507 can include the data values508A, 508C, 508E, 508G, and 508I, and may not include the data values508B, 508D, 508F, and 508H of the time series 506 of FIG. 5B. Further,the data values 508A, 508C, 508E, 508G, and 508I of the time series 506may match up with the data values 504A, 504B, 504C, 504D, and 504E atthe same respective timestamps. Thus, the time series service 100 mayperform an operation, such as an addition, divide, or average function,for example, on the time series 502 and the time series 506 since thosetime series may have values at the same respective timestamps.

The time series service 100 may use one or more methods to generate thetime series 507 from the time series 506 of FIG. 5B. In someembodiments, the respective time units of the times series 502 and thetime series 506 of FIG. 5A may be stored as metadata. For example, thefirst time series 502 can include first timestamps that correspond to afirst time unit, such as seconds, and the second time series 506 caninclude second timestamps that correspond to a second time unit, such asmilliseconds. First metadata may include a first association between thefirst time series 502 and the first time unit, such as seconds. Secondmetadata may include a second association between the second time series506 and the second time unit, such as milliseconds.

The time series service 100 can determine, using the first metadata andthe second metadata, that the first time unit and the second time unitare different. In the example, the first time series 502 includestimestamps that correspond to seconds and the second time series 506includes timestamps that correspond to milliseconds, which are differenttime units. The time series service 100 can determine that the secondtime unit is more granular than the first time unit. In the example, thetime series service 100 determines that the second time unit(milliseconds) of the second time series 506 is more granular than thefirst time unit (here seconds) of the first time series 502.

The time series service 100 can identify a first set of timestamps fromthe first time series and a second set of timestamps from the secondtime series. In the example, the time series service 100 identifies thefirst set of timestamps (A, B, C, D, and E) from the first time series502 and a second set of timestamps (A, A′, B, B′, C, C′, D, D′, and E)from the second time series 506. The time series service 100 canidentify, from the second set of timestamps, a second subset oftimestamps that correspond to a granularity of the first time unit. Inthe example, the second set of timestamps (A, A′, B, B′, C, C′, D, E′,and E) that correspond to the first time unit (here seconds) is thesecond subset of timestamps (A, B, C, D, and E). In the example, thetimestamp A can correspond to zero milliseconds, the timestamp A′ cancorrespond to a millisecond between 0 and 1000 milliseconds, and thetimestamp B can correspond to 1000 milliseconds (1 second). Thus, thesecond subset of timestamps (A, B, C, D, and E) does not include thetimestamp A′ because it is a time between 0 and 1000 milliseconds anddoes not correspond to a granularity of the first time unit (hereseconds).

The time series service 100 can generate, from the first time series andthe first set of timestamps, a first data set. In the example, the timeseries service 100 generates a first data set that includes the datavalues 504A, 504B, 504C, 504D, and 504E that correspond to the first setof timestamps A, B, C, D, and E. The time series service 100 cangenerate, from the second time series and the second subset oftimestamps, a second interpolated data set. In the example, the timeseries service 100 generates a second interpolated data set thatincludes the data values 508A, 508C, 508E, 508G, and 508I of FIG. 5Bthat correspond to the second subset of timestamps A, B, C, D, and E.Thus, the time series service 100 can perform an operation on the firstdata set and the second interpolated data set since each respective dataset has data values that correspond to the same timestamps A, B, C, D,and E. Further, as shown in FIG. 5B, the interpolate time series 507does not include data values for the timestamps A′, B′, C′, and D′,since those timestamps were not of the same granularity as the firsttime unit of the first time series 502.

In other embodiments, the time series service 100 can use other methodsto interpolate data. The time series service 100 can dynamicallydetermine common timestamps to generate interpolated data. The timeseries service 100 can compare the timestamps of a first time series andthe timestamps of a second time series to determine common timestamps.For example, the time series service 100 can compare the timestamps (A,B, C, D, and E) of the first time series 502 to the timestamps (A, A′,B, B′, C, C′, D, D′, and E) of the second time series 506 of FIG. 5A. Inthe example comparison, the common timestamps between the time series502 and 506 are the timestamps (A, B, C, D, and E). The time seriesservice 100 can generate new time series data from the commontimestamps. For example, as shown in FIG. 5B, the time series data 507includes the data values 508A, 508C, 508E, 508G, and 508I thatcorrespond to the common timestamps (A, B, C, D, and E). Further, in thetime series 507, the data values 508B, 508D, 508F, and 508H of the timeseries 506 of FIG. 5B are not present. Thus, the time series service 100may perform an operation on the time series 502 and 507 since the timeseries 502 and 507 include common timestamps.

FIGS. 5C-5G illustrate additional example time series data. Further, thetime series service 100 can use one or more methods to generate theinterpolated data of FIGS. 5D, 5E, 5F, and/or 5G. The one or moreinterpolation methods can include one or more interpolation operations,such as, a “none” interpolation operation, a “nearest” interpolationoperation, a “previous” interpolation operation, a “next” interpolationoperation, a linear interpolation operation, and/or a polynomialinterpolation operation. The interpolation shown in FIGS. 5A to 5B maycorrespond to a “none” interpolation operation.

The one or more interpolation methods of the time series service 100 canapply different interpolation operations in different situations. Thetime series service 100 can apply different interpolation operationsbased on a position of a timestamp for a to-be-generated interpolateddata value relative to one or more timestamps for existing data values.In some embodiments, the time series service 100 can apply differentinterpolation operations at a “before” or first phase of interpolation,at an “internal” or second phase of interpolation, and at an “after” orthird phase of interpolation.

At the “before” or first phase of interpolation, the time series service100 can at least apply the “nearest” interpolation operation or the“none” interpolation operation. The “before” or first phase ofinterpolation may correspond to any timestamp that is before a firstexisting timestamp, where the first existing timestamp is the earliesttimestamp in an existing time series.

At the “internal” or second phase of interpolation, the time seriesservice 100 can at least apply the “none” interpolation operation, a“nearest” interpolation operation, a “previous” interpolation operation,a “next” interpolation operation, or a linear interpolation operation.Additionally or alternatively, the time series service 100 can apply apolynomial interpolation operation during the “internal” or second phaseof interpolation. The “internal” or second phase of interpolation maycorrespond to any timestamp between the first existing timestamp and alast existing timestamp, where the last existing timestamp is the oldesttimestamp in an existing time series.

At the “after” or third phase of interpolation, the time series service100 can at least apply the “nearest” interpolation operation or the“none” interpolation operation. The “after” or third phase ofinterpolation may correspond to any timestamp that is after the lastexisting timestamp.

In FIG. 5C, the data environment 510 includes a time series 511. Thetime series 511 includes at least the data values 514C, 514H, and 514Mat the timestamps C, E, and G, respectively. The time series 511 of FIG.5C may be similar to the time series 502 of FIG. 5A in some respects. InFIG. 5C, the time series service 100 may apply an operation from a timeseries expression to the time series 511 and at least one other timeseries (not illustrated), which may be similar to the illustratedsituation of FIGS. 5A-5B. Thus, the time series service 100 may applyone or more interpolation techniques that result in the generation ofinterpolated data as shown in one of FIG. 5D, 5E, 5F, or 5G.

In FIG. 5D, the data environment 510 includes a generated time series512A. The time series 512A of FIG. 5D may be similar to the time series511 of FIG. 5C in some respects. Further, the time series service 100can generate the time series 512A of FIG. 5D from the time series 511 ofFIG. 5C. The time series 512A includes at least the data values 514A,514B, 514C, 514D, 514H, 514I, 514M, 514N, and 514O at the timestamps A,B, C, D, E, F, G, H, and I, respectively. The data values 514A, 514B,514D, 514I, 514N, and 514O at the timestamps A, B, D, F, H, and I,respectively, may be interpolated data values.

In FIG. 5D, the interpolated data values 514A and 514B at the timestampsA and B, respectively, may correspond to the “before” or first phase ofinterpolation. The timestamps A and B are before the first existingtimestamp 00:03 from the time series 511 of FIG. 5C. Accordingly, thetime series service 100 can apply the “nearest” interpolation operationto generate the interpolated data values 514A and 514B. In applying the“nearest” interpolation operation, the time series service 100identifies the nearest existing data value and generates an interpolateddata value from the nearest existing data value. An example method ofgenerating a nearest interpolated data value is copying the nearest datavalue. In the example of FIG. 5D, the time series service 100 identifiesthe data value 514C at timestamp C as the nearest existing data valuefor the timestamps A and B. The time series service 100 can copy thedata value 514C to generate the interpolated data values 514A and 514B.

The interpolated data values 514D and 514I at the timestamps D and F,respectively, may correspond to the “internal” or second phase ofinterpolation. The timestamps D and F are between the first existingtimestamp C and the last existing timestamp G from the time series 511of FIG. 5C. Accordingly, the time series service 100 can apply the“previous” or “nearest” interpolation operation to generate theinterpolated data values 514D and 514I. In some embodiments, for the“nearest” interpolation operation, if there is more than one data valuethat is equally near a particular timestamp, then the time seriesservice 100 can pick the earliest data value, the latest data value,and/or pseudo-randomly choose a data value from multiple data values. Inapplying the “previous” interpolation operation, the time series service100 identifies the previous existing data value and generates aninterpolated data value from the previous existing data value. Anexample method of generating an interpolated data value using the“previous” interpolation operation is copying the previous data value.In the example of FIG. 5D, the time series service 100 identifies thedata value 514C at timestamp C as the previous existing data value forthe timestamp D. The time series service 100 can copy the data value514C to generate the interpolated data value 514D. Similarly, the timeseries service 100 can copy the data value 514H to generate theinterpolated data value 514I since the data value 514H at timestamp Emay be the previous existing data value with respect to the timestamp F.

In FIG. 5D, the interpolated data values 514N and 514O at the timestampsH and I, respectively, may correspond to the “after” or third phase ofinterpolation. The timestamps H and I are after the last existingtimestamp G from the time series 511 of FIG. 5C. Accordingly, the timeseries service 100 can apply the “nearest” interpolation operation togenerate the interpolated data values 514N and 514O. In the example, thetime series service 100 identifies the data value 514M at timestamp G asthe nearest existing data value for the timestamps H and I. The timeseries service 100 can copy the data value 514M to generate theinterpolated data values 514N and 514O.

In FIG. 5E, the data environment 510 includes a generated time series512B. The time series 512B of FIG. 5E may be similar to the time series511 of FIG. 5C in some respects. Further, the time series service 100can generate the time series 512B of FIG. 5E from the time series 511 ofFIG. 5C. The time series 512B includes at least the data values 514A,514B, 514C, 514E, 514H, 514J, 514M, 514N, and 514O at the timestamps A,B, C, D, E, F, G, H, and I, respectively. The data values 514A, 514B,514E, 514J, 514N, and 514O at the timestamps A, B, D, F, H, and I,respectively, may be interpolated data values. Further, the method ofgenerating the interpolated data values 514E and 514J may be differentthan an interpolation method described with respect to FIG. 5A-5B or5C-5D.

In FIG. 5E, the interpolated data values 514A and 514B at the timestampsA and B, respectively, may correspond to the “before” or first phase ofinterpolation. Accordingly, the time series service 100 can apply the“nearest” interpolation operation to generate the interpolated datavalues 514A and 514B in FIG. 5E. The application of the “nearest”interpolation operation in FIG. 5E, such as with respect to the “before”or first phase, may be similar to the application of the “nearest”interpolation operation in FIG. 5D.

The interpolated data values 514E and 514J at the timestamps D and F,respectively, may correspond to the “internal” or second phase ofinterpolation. Accordingly, the time series service 100 can apply the“next” or “nearest” interpolation operation to generate the interpolateddata values 514E and 514J. In applying the “next” interpolationoperation, the time series service 100 identifies the next existing datavalue and generates an interpolated data value from the next existingdata value. An example method of generating an interpolated data valueusing the “next” interpolation operation is copying the next data value.In the example of FIG. 5E, the time series service 100 identifies thedata value 514H at timestamp E as the next existing data value for thetimestamp D. The time series service 100 can copy the data value 514H togenerate the interpolated data value 514E. Similarly, the time seriesservice 100 can copy the data value 514M to generate the interpolateddata value 514J since the data value 514M at timestamp G may be the nextexisting data value with respect to the timestamp F.

In FIG. 5E, the interpolated data values 514N and 514O at the timestampsH and I, respectively, may correspond to the “after” or third phase ofinterpolation. Accordingly, the time series service 100 can apply the“nearest” interpolation operation to generate the interpolated datavalues 514N and 514O. The application of the “nearest” interpolationoperation in FIG. 5E, such as with respect to the “after” or thirdphase, may be similar to the application of the “nearest” interpolationoperation in FIG. 5D.

In FIG. 5F, the data environment 510 includes a generated time series512C. The time series 512C of FIG. 5F may be similar to the time series511 of FIG. 5C in some respects. Further, the time series service 100can generate the time series 512C of FIG. 5F from the time series 511 ofFIG. 5C. The time series 512C includes at least the data values 514A,514B, 514C, 514F, 514H, 514K, 514M, 514N, and 514O at the timestamps A,B, C, D, E, F, G, H, and I, respectively. The data values 514A, 514B,514F, 514K, 514N, and 514O at the timestamps A, B, D, F, H, and I,respectively, may be interpolated data values. Further, the method ofgenerating the interpolated data values 514F and 514K may be differentthan an interpolation method described with respect to FIG. 5A-5B or5C-5E.

In FIG. 5F, the interpolated data values 514A and 514B at the timestampsA and B, respectively, may correspond to the “before” or first phase ofinterpolation. Accordingly, the time series service 100 can apply the“nearest” interpolation operation to generate the interpolated datavalues 514A and 514B in FIG. 5E. The application of the “nearest”interpolation operation in FIG. 5E, such as with respect to the “before”or first phase, may be similar to the application of the “nearest”interpolation operation in FIG. 5D.

The interpolated data values 514F and 514K at the timestamps D and F,respectively, may correspond to the “internal” or second phase ofinterpolation. Accordingly, the time series service 100 can apply alinear interpolation operation or calculation to generate theinterpolated data values 514F and 514K. In applying the linearinterpolation operation or calculation, the time series service 100identifies the previous existing data value and the next existing datavalue with respect to a timestamp and generates an interpolated datavalue from the previous existing data value and the next existing datavalue. An example method of generating an interpolated data value usingthe linear interpolation operation or calculation determining a linearfunction that corresponds to the previous existing data value and thenext existing data value. An example linear function is the equationy=mx+b, which can be determined from the (x1,y1) coordinate for theprevious existing data value and the (x2,y2) coordinate for the nextexisting data value. In some embodiments, the slope can be determinedfrom the equation that corresponds to m=(y2−y1)/(x2−x1) and b, they-intercept, can be determined using algebra.

In the example of FIG. 5F, the time series service 100 identifies thedata value 514C at timestamp C as the previous existing data value forthe timestamp D and the data value 514H at timestamp E as the nextexisting data value for the timestamp D. The time series service 100 candetermine a line or linear equation (y=mx+b) using the existing datavalues 514C and 514H. Using the line or linear equation, the time seriesservice 100 can determine the interpolated data value 514F using theline or linear equation (y=mx+b) where m and b have previously beendetermined and the input value for x is in the timestamp D. Accordingly,as shown in FIG. 5I4F, the data value or point 514F is on the straightline between the data values or points 514C and 514H. Similarly, thetime series service 100 can use a linear interpolation operation orcalculation to generate the interpolated data value 514K at timestamp Fbased on the existing data values for the timestamps E and G.

In FIG. 5G, the data environment 510 includes a generated time series512D. The time series 512C of FIG. 5G may be similar to the time series511 of FIG. 5C in some respects. Further, the time series service 100can generate the time series 512D of FIG. 5G from the time series 511 ofFIG. 5C. The time series 512C includes at least the data values 514A,514B, 514C, 514G, 514H, 514L, 514M, 514N, and 514O at the timestamps A,B, C, D, E, F, G, H, and I, respectively. The data values 514A, 514B,514G, 514L, 514N, and 514O at timestamps A, B, D, F, H, and I,respectively, may be interpolated data values. The method of generatingthe interpolated data values 514G and 514L may be different than aninterpolation method described with respect to FIG. 5A-5B or 5C-5F.However, the method for generating the data values 514A and 514B withrespect to a “before” or first phase of interpolation and/or the datavalues 514N and 514O with respect to an “after” or third phase ofinterpolation may be similar to the methods of respective phases of FIG.5D as described above.

The interpolated data values 514G and 514L at the timestamps D and F,respectively, may correspond to the “internal” or second phase ofinterpolation. Accordingly, the time series service 100 can apply apolynomial interpolation operation or calculation to generate theinterpolated data values 514G and 514L. In applying the polynomialinterpolation operation or calculation, the time series service 100identifies the multiple existing data values and generates aninterpolated data value from the multiple existing data values. Apolynomial can be a mathematical expression comprising a sum of terms,each term including a variable or variables raised to a power andmultiplied by a coefficient. The curved lines connecting the data values514C, 514H, and 514M are illustrated to generally represent a polynomialfunction and may not be exactly illustrated to represent a particularpolynomial function of the illustrated data values. One or more knowntechniques may be used to generate or determine a polynomial functionbased on multiple known and existing data values, which can then be usedto generate an interpolated data value.

FIGS. 5H and SI illustrate example time series data and/or time seriesnormalization. In FIG. 5H, the data environment 520 includes a firsttime series 522 and a second time series 526. The first time series 502includes at least the data values 524A, 524B, 524C, 524D, and 524E atthe timestamps A, B, C, D, and E, respectively. The timestamps A, B, C,D, and E of the first time series 522 and/or the timestamps of thesecond time series 526 can be stored as an integer, such as a longinteger. As described herein, the first time series 522 and the secondtime series 526 may have metadata that indicates that the respectivetime series is stored in a particular time unit, such hours, minutes,seconds, milliseconds, microseconds, nanoseconds, or any other time unitor interval. The second time series 506 includes at least the datavalues 508A, 508B, 508C, 508D, 508E, 508F, 508G, 508H, and 508I at thetimestamps F, G, H, I, and J. As shown in FIG. 5A, the timestamps A, B,C, D, E, F, G, H, I, and J represent any kind of timestamp and do notcorrespond to any specific timestamp format. In the example, A, B, C, D,and E can correspond to the values 1, 2, 3, 4, and 5, respectively (fora time series stored in seconds); F, G, H, I, and J can correspond tothe values 1000, 2000, 3000, 4000, and 5000, respectively (for a timeseries stored in milliseconds).

As described herein, the time series service 100 processes requests thatcan include time series expressions referencing one or more timesseries. Thus, a time series expression can include references to thefirst time series 522 and the second time series 526 to perform anoperation on the times series 502 and 506. However, the first timeseries 522 and the second time series 526 may be stored in differenttime units such that the time series are incompatible for performingoperations on both of the time series. Accordingly, the time seriesservice 100 may modify one or more of the time series 502 and 506 forthe one or more time series to be in a compatible format for one or moreoperations. [0095] FIG. 5I illustrates additional time series data. InFIG. 5I, the data environment 500 includes a generated time series 527and the second time series 526. Some of the time series data of FIG. 5Hmay be similar to the time series data of FIG. 5I. For example, thesecond time series 526 of FIG. 5H may be the same as the second timeseries of FIG. 5I. The generated time series 527 may represent a dataset that is generated from the time series 526 of FIG. 5H. The generatedtime series 527 can include the data values 524A, 524B, 524C, 524D, and524E at the timestamps A′, B′, C′, D′, and E′. Further, the timestampsA′, B′, C′, D′, and E′ of the generated time series 527 may be in thesame time unit as the timestamps F, G, H, I, and J of the second timeseries 526. Thus, the time series service 100 may perform an operation,such as an addition, divide, or average function, for example, on thegenerated time series 526 and the second time series 526 since thosetime series may have timestamps that are stored in a common time unit.

The time series service 100 may use one or more methods to generate thetime series 527 from the time series 526 of FIG. 5H. In someembodiments, the respective time units of the times series 522 and thetime series 526 of FIG. 5H may be stored as metadata. For example, thefirst time series 522 can include first timestamps that correspond to afirst time unit, such as seconds, and the second time series 526 caninclude second timestamps that correspond to a second time unit, such asmilliseconds. First metadata may include a first association between thefirst time series 522 and the first time unit, such as seconds. Secondmetadata may include a second association between the second time series526 and the second time unit, such as milliseconds.

The time series service 100 can determine, using the first metadata andthe second metadata, that the first time unit and the second time unitare different. In the example, the first time series 522 includestimestamps that correspond to seconds and the second time series 526includes timestamps that correspond to milliseconds, which are differenttime units. The time series service 100 can determine that the secondtime unit is more granular than the first time unit. In the example, thetime series service 100 determines that the second time unit(milliseconds) of the second time series 526 is more granular than thefirst time unit (here seconds) of the first time series 522.

The time series service 100 can generate, from the first time series andthe first set of timestamps, a first data set. The time series service100 can determine a conversion operation. Example conversationoperations include functions, such as a scaling function. In theexample, the time series service 100 determines a scaling function toconvert from a first time unit to a second time unit, which can includemultiplying or dividing the first set of timestamps by a constant togenerate a second set of timestamps. In the example to convert fromseconds to milliseconds, the time series service 100 determines ascaling function to multiply each timestamp of the first set oftimestamps by the constant 1000 to generate a second set of timestampsin milliseconds. As shown in FIG. 5I, the second set of timestamps A′,B′, C′, D′, and E′ (e.g., 1000, 2000, 3000, 4000, and 5000) aregenerated by applying a conversation operation, such as a scalingfunction (e.g., multiplying by 1000), to the first set of timestamps A,B, C, D, and E (e.g., 1, 2, 3, 4, and 5). In FIG. 5I, the resulting timeseries 527 may be in a common time unit as the time series 526.

FIG. 6 is a flowchart of a method for time series interpolation and/ortime series normalization, according to some embodiments of the presentdisclosure. Although the method 600 is described in conjunction with thesystems of FIG. 1 , any system configured to perform the method, in anyorder, is within the scope of this disclosure. The method 600 may beperformed by the various components of the time series service 100 ofFIG. 1 as discussed herein, including the communication interface 106,the query executor 108, and/or the backend interface 112. Depending onthe embodiment, the method 600 may include fewer or additional blocksand/or the blocks may be performed in an order different than isillustrated. Blocks of the method 600 may be similar to blocks of anyother method described herein. The techniques and/or algorithms of ablock of the method 600 may describe the techniques and/or algorithmsthat can be used at a block of any other the method described herein.For example, one or more of the blocks of FIG. 6 may be performed atblocks 404 and/or 410 of FIG. 4 . Additionally or alternatively, themethod 600 may be combined with any other method described herein.

At block 602, the query executor 108 processes the time series requests.Processing a time series request can include determining one or moreparameters from the request. For example, the API of the time seriesservice 100 may enable an external call to the service 100 to specifyone or more interpolation configuration parameters. The exampleinterpolation configuration parameters can specify or include one ormore interpolation operations, such as, a “none” interpolationoperation, a “nearest” interpolation operation, a “previous”interpolation operation, a “next” interpolation operation, a linearinterpolation operation, and/or a polynomial interpolation operation.

In some embodiments, the example interpolation configuration parameterscan specify or include one or more particular interpolation operationsfor a particular phase. An example set of interpolation configurationparameters includes {before phase: none; internal phase: none; and afterphase: none} that specifies that the “none” interpolation operationshould be applied. The interpolation of FIGS. 5A-5 b may correspond tothe “none” interpolation operation. Another example set of interpolationconfiguration parameters includes {before phase: nearest; internalphase: nearest; and after phase: nearest} that specifies that the“nearest” interpolation operation should be applied. Yet another exampleset of interpolation configuration parameters includes {before phase:nearest; internal phase: linear; and after phase: nearest} thatspecifies that, where applicable, the “nearest” interpolation operationand the linear interpolation operation should be applied.

At block 604, the query executor 108 receives and/or determines metadatafor the one or more time series. As described herein, example metadataincludes a time unit for a particular time series, such as, but notlimited to, second, millisecond, or microsecond. In some embodiments,the metadata can be retrieved from the metadata storage 110. In anexample, first metadata including a first association between a firsttime series and a first time unit, and second metadata including asecond association between a second time series and a second time unitis stored in the metadata storage 110.

At block 606, the query executor 108 processes the metadata. The queryexecutor 108 can determine, using the first metadata and the secondmetadata, that the first time unit and the second time unit aredifferent. For example, the query executor 108 can determine that afirst time series is associated with a first time unit (in seconds) andthat a second time series is associated with a second time unit(microseconds). The query executor 108 can further determine therelative granularity of the first time unit to the second time unit. Forexample, the query executor 108 can determine that a second time unit ismore granular than the first time unit, or vice versa.

At block 608, the query executor 108 generates interpolated data and/ornormalized data. In some embodiments, at least one of the first timeseries or second time series identified in the time series request maycause the time series service 100 to generate interpolated data for thefirst time series or second time series, such that the time series maybe in a state for an operation to be performed on both data sets.

The query executor 108 can use the “none” interpolation operation, whichmay be described in further detail with respect to FIG. 5B. as describedherein, the “none” interpolation operation can include: identifying afirst set of timestamps from the first time series and a second set oftimestamps from the second time series; identifying, from the second setof timestamps, a second subset of timestamps that correspond to thegranularity of the first time unit; generating, from the first timeseries and the first set of timestamps, a first data set; andgenerating, from the second time series and the second subset oftimestamps, a second interpolated data set.

Additionally or alternatively, the query executor 108 can execute one ormore of the “none” interpolation operation, a “nearest” interpolationoperation, a “previous” interpolation operation, a “next” interpolationoperation, a linear interpolation operation, and/or a polynomialinterpolation operation, which may be described in further detail withrespect to FIGS. 5A-5G. Further, the query executor 108 can take intoconsideration one of the three phases for determining whichinterpolation operation to perform.

The query executor 108 can generate normalized data. The time seriesdata can be stored as (timestamp, value) pairs. In some embodiments, thetimestamp can be an integer, such as a long integer, which may not beassociated with any time unit. As described herein, the metadata canindicate the time unit of a time series. Thus, a first time series canbe stored as (1, 0.5), (2, 1.5), and (3, 2.5) in seconds or a secondtime series can be stored as (1000, 0.5), (2000, 1.5), and (3000, 2.5)in milliseconds. To perform an operation on two or more time series, thequery executor 108 can normalize one or more of the time series to acommon time unit. In the example, the query executor 108 determines thatthe second time series has the most granular time unit (milliseconds),and, therefore, the query executor 108 normalizes the first time seriesto the more granular time unit. The query executor 108 applies anoperation to the first time series to convert the time series to themore granular time unit. In the example, the query executor 108 wrapsthe first time series in an operation that time scales the time series,such as by multiplying each timestamp by a constant factor of 1000.Thus, a normalized time series from the first time series would havetimestamps in the same format and/or the same granularity of the secondtime series to perform on or more additional operations.

In some embodiments, generating normalized data can include applying aconversion operation, such as a conversion function. In an example witha second time series having a more granular time unit than a second timeseries, the query executor 108 can generate a normalized set oftimestamps from the first set of timestamps and the second time unit.The query executor 108 can generate a normalized data set from the firsttime series and the second time unit. The query executor 108 can apply atime scaling function to each timestamp from the first set of timestampswhere the time scaling function converts a timestamp from the first timeunit to the second time unit. In some embodiments, the query executor108 accesses predetermined conversion functions based on an input timeunit and an output time unit (where the timestamps are converted fromthe input time unit to the output time unit). The predeterminedconversion functions can indicate conversions between seconds,milliseconds, microseconds, minutes, hours, etc. In other embodiments,the query executor 108 can dynamically determine the scaling functionusing algebraic logic and the input time unit and the output time unit.Example time scaling functions can include division and/ormultiplication, such as dividing and/or multiplying by one or moreconstant values.

At block 610, the query executor 108 can process the interpolated dataand/or normalized to generate one or more new time series. Example newtime series generated by the query executor 108 can include the timeseries 507, 512A, 512B, 512C, and 512D of FIGS. 5B and 5D-5G,respectively.

Example Time Series Efficiency/Optimization Processes

FIG. 7 is a flowchart of a method for efficient time series expressiongeneration and/or execution, according to some embodiments of thepresent disclosure. Although the method 700 is described in conjunctionwith the systems of FIG. 1 , any system configured to perform themethod, in any order, is within the scope of this disclosure. The method700 may be performed by the various components of the time seriesservice 100 of FIG. 1 as discussed herein, including the communicationinterface 106, the query executor 108, and/or the backend interface 112.Depending on the embodiment, the method 700 may include fewer oradditional blocks and/or the blocks may be performed in an orderdifferent than is illustrated. Blocks of the method 700 may be similarto blocks of any other method described herein. The techniques and/oralgorithms of a block of the method 700 may describe the techniquesand/or algorithms that can be used at a block of any other the methoddescribed herein. For example, one or more of the blocks of FIG. 7 maybe performed at blocks 404, 406, 408, and/or 410 of FIG. 4 .Additionally or alternatively, the method 700 may be combined with anyother method described herein.

At block 702, the query executor 108 processes the time seriesexpression of the time series request. Example time series expressionsare the expressions 312 and 324 of FIGS. 3A and 3B, respectively. A timeseries expression can define how one or more data sources may be queriedand/or how to process the results of the queries. Accordingly, a timeseries expression can include two or more nodes, such as nodes in atree, where a node can correspond to at least one of a time seriesoperation, a combined operation, a query, and/or one or more timeseries, such as one or more time series indicators. To improve theefficiency of the time series expression, the query executor 108 canidentify a number of nodes that correspond to a time series operation.

In some embodiments, the query executor 108 processes the time seriesexpression by evaluating one or more query nodes. An example query nodeis the query node 326 of FIG. 3B. A query node can specify a time seriesquery to be executed by the query executor 108. The query executor 108can retrieve the time series results by executing the query of the querynode. As described herein, an example query can correspond to thefollowing pseudocode: “SELECT [TIME SERIES METADATA] FROM DATA_SOURCEWHERE [QUERY PARAMETERS].”

At block 704, the query executor 108 generates a new time seriesexpression. In some embodiments, the new time series expression may bemore efficient than the original time series expression. For example, asdescribed with respect to FIG. 3A, the query executor 108 can generate acombined node operation from two or more operation nodes to reduce thenumber of sub-nodes in a time series expression. The new time seriesexpression can include the generated combined node operation instead ofthe two or more operation nodes. As described herein, the generated timeseries expression may result in faster computer processing and/or areduced burden on a computer processor since the computationaloperations may be optimized.

In some embodiments, the query executor 108 replaces one or more nodesin the original time series expression to generate a new time seriesexpression. In the example time series expression with a query node,such as the query node 326 of FIG. 3B, the query executor 108 canreplace the query node with the identified time series indicators.Accordingly, the query executor 108 can generate a fully planned timeseries expression by replacing one or more query nodes in the originaltime series expression.

At block 706, the backend interface 112 executes the new times seriesexpression to retrieve one or more results from one or more time seriesdatabases. As described herein, the new time series expression caninclude information regarding which particular time series database toretrieve data from and/or query for each respective time seriesindicator. The query executor 108 can apply one or more operations ofthe new time series expression to generate data, such as one or moredata values and/or new time series.

FIG. 8 is a flowchart of a method for efficient location of time seriesdata, according to some embodiments of the present disclosure. Althoughthe method 800 is described in conjunction with the systems of FIG. 1 ,any system configured to perform the method, in any order, is within thescope of this disclosure. The method 800 may be performed by the variouscomponents of the time series service 100 of FIG. 1 as discussed herein,including the communication interface 106, the query executor 108,and/or the backend interface 112. Depending on the embodiment, themethod 800 may include fewer or additional blocks and/or the blocks maybe performed in an order different than is illustrated. Blocks of themethod 800 may be similar to blocks of any other method describedherein. The techniques and/or algorithms of a block of the method 800may describe the techniques and/or algorithms that can be used at ablock of any other the method described herein. For example, one or moreof the blocks of FIG. 8 may be performed at blocks 404, 406, and/or 408of FIG. 4 . Additionally or alternatively, the method 800 may becombined with any other method described herein.

At block 802, the query executor 108 retrieves metadata from themetadata storage 110 based on the time series expression. The queryexecutor 108 can retrieve metadata for respective time series identifiedby the time series expression. Example metadata can include one or moredata locators that specify where a time series is located and/or couldpotentially be located.

At block 804, the query executor 108 retrieves one or more data locatorsfrom the metadata. In some embodiments, a particular time series may beassociated with two or more data locators that indicates that the timeseries is located and/or could potentially be located in two or moredata sources.

At block 806, the query executor 108 can determine whether a time seriesis present in one or more time series databases. In some embodiments, adata locator identifying a database for time series is indicative of thepresence of the time series in a database. In other embodiments, thequery executor 108 queries the database indicated by the data locator toverify that the time series is present in the time series database.Thus, the query executor 108 can determine if a time series is notpresent in a time series database.

At block 808, the query executor 108 can cause the data pipeline system134 to populate time series data where the time series data is notpresent in a time series database. The query executor 108 can issue acommand via the backend interface 112 to the data pipeline system 134 tostore particular time series data in a time series database. In someembodiments, the time series service 100 receives a notification whenthe population of the time series data has been completed. Further, thetime series service 100 can store metadata regarding the newly populatedtime series in the metadata storage 110. Example metadata for the newlypopulated time series include a time unit associated with the timeseries.

At block 810, the query executor 108 determines a subset of datalocators for the time series expression. The query executor 108 canselect a subset of the data locators based on conditional logic. Theconditional logic can specify a preference for the query executor 108 toselect a minimum number of time series databases and/or data pipelinesystems to query and/or communicate with. For example, if the querylocator 108 determines that a first time series is present in a firsttime series database and a second time series database, and a secondtime series is present in the second time series database, the querylocator 108 can select the second time series database to efficientlyquery both the first and second time series instead of inefficientlyquerying a greater number of databases. The query executor 108 can alsoinclude additional conditional logic that specifies a preference forparticular time series databases over others, based on expectedresponsiveness, query times, and/or distance. Additional conditionallogic can be based on other information, such as whether the time seriesrequest is from an interactive graphical user interface or a batchprocess. For example, if a request is from an interactive graphical userinterface, then a faster time series database and/or a database withlower latency may be identified over a less performant time seriesdatabase. Alternatively, if a request is for a batch process, then aslower backend system or one with higher latency may be identified toservice the time series query.

Implementation Mechanisms

The various computing device(s) discussed herein, such as the timeseries service 100, the communication interface 106, the query generator108, the backend interface 112, and/or the user computing device 102,are generally controlled and coordinated by operating system software,such as, but not limited to, iOS, Android, Chrome OS, Windows XP,Windows 7, Windows 8, Unix, Linux, or other compatible operatingsystems. In other embodiments, the computing devices may be controlledby a proprietary operating system. Conventional operating systemscontrol and schedule computer processes for execution, perform memorymanagement, provide file system, networking, I/O services, and provide auser interface functionality, among other things. The time seriesservice 100 may be hosted and/or executed on one or more computingdevices with one or more hardware processors and with any of thepreviously mentioned operating system software.

FIG. 9 is a block diagram that illustrates example components of thetime series service 100. While FIG. 9 refers to the time series service100, any of the other computing devices, modules, services, and/or usercomputing devices discussed herein may have some or all of the same orsimilar components.

The time series service 100 may execute software, e.g., standalonesoftware applications, applications within browsers, networkapplications, etc., whether by the particular application, the operatingsystem, or otherwise. Any of the systems discussed herein may beperformed by the time series service 100 and/or a similar computingsystem having some or all of the components discussed with reference toFIG. 9 .

The time series service 100 includes a bus 902 or other communicationmechanism for communicating information, and a hardware processor, ormultiple processors, 904 coupled with bus 902 for processinginformation.

The time series service 100 also includes a main memory 906, such as arandom access memory (RAM), cache and/or other dynamic storage devices,coupled to bus 902 for storing information and instructions to beexecuted by processor(s) 904. Main memory 906 also may be used forstoring temporary variables or other intermediate information duringexecution of instructions to be executed by processor(s) 904. Suchinstructions, when stored in storage media accessible to processor(s)904, render the time series service 100 into a special-purpose machinethat is customized to perform the operations specified in theinstructions. Such instructions, as executed by hardware processors, mayimplement the methods and systems described herein for generating and/orexecuting efficient queries.

The time series service 100 further includes a read only memory (ROM)908 or other static storage device coupled to bus 902 for storing staticinformation and instructions for processor(s) 904. A storage device 910,such as a magnetic disk, optical disk, or flash drive, etc., is providedand coupled to bus 902 for storing information and instructions. Thecommunication interface 106, the query generator 108, and/or the backendinterface 112 of FIG. 1 may be stored on the main memory 906 and/or thestorage device 910.

The time series service 100 and/or user computing device 102 may becoupled via bus 902 to a display 912, such as a LCD display or touchscreen, for displaying information to a computer user. An input device914 is coupled to bus 1002 for communicating information and commandselections to processor 904. One type of input device 914 is a keyboardincluding alphanumeric and other keys. Another type of input device 914is a touch screen.

In general, the word “instructions,” as used herein, refers to logicembodied in hardware or firmware, or to a collection of software units,possibly having entry and exit points, written in a programminglanguage, such as, but not limited to, Java, Lua, C, C++, or C#. Asoftware unit may be compiled and linked into an executable program,installed in a dynamic link library, or may be written in an interpretedprogramming language such as, but not limited to, BASIC, Perl, orPython. It will be appreciated that software units may be callable fromother units or from themselves, and/or may be invoked in response todetected events or interrupts. Software units configured for executionon computing devices by their hardware processor(s) may be provided on acomputer readable medium, such as a compact disc, digital video disc,flash drive, magnetic disc, or any other tangible medium, or as adigital download (and may be originally stored in a compressed orinstallable format that requires installation, decompression ordecryption prior to execution). Such software code may be stored,partially or fully, on a memory device of the executing computingdevice, for execution by the computing device. Software instructions maybe embedded in firmware, such as an EPROM. It will be furtherappreciated that hardware modules may be comprised of connected logicunits, such as gates and flip-flops, and/or may be comprised ofprogrammable units, such as programmable gate arrays or processors.Generally, the instructions described herein refer to logical modulesthat may be combined with other modules or divided into sub-modulesdespite their physical organization or storage.

The time series service 100, or components of it, such as thecommunication interface 106, the query generator 108, and/or the backendinterface 112 of FIG. 1 , may be programmed, via executable codeinstructions, in a programming language.

The term “non-transitory media,” and similar terms, as used hereinrefers to any media that store data and/or instructions that cause amachine to operate in a specific fashion. Such non-transitory media maycomprise non-volatile media and/or volatile media. Non-volatile mediaincludes, for example, optical or magnetic disks, such as storage device910. Volatile media includes dynamic memory, such as main memory 906.Common forms of non-transitory media include, for example, a floppydisk, a flexible disk, hard disk, solid state drive, magnetic tape, orany other magnetic data storage medium, a CD-ROM, any other optical datastorage medium, any physical medium with patterns of holes, a RAM, aPROM, and EPROM, a FLASH-EPROM, NVRAM, any other memory chip orcartridge, and networked versions of the same.

Non-transitory media is distinct from but may be used in conjunctionwith transmission media. Transmission media participates in transferringinformation between non-transitory media. For example, transmissionmedia includes coaxial cables, copper wire and fiber optics, includingthe wires that comprise bus 902. Transmission media can also take theform of acoustic or light waves, such as those generated duringradio-wave and infra-red data communications.

Bus 902 carries data to main memory 906, from which the processor(s) 904retrieves and executes the instructions. The instructions received bymain memory 906 may retrieve and execute the instructions. Theinstructions received by main memory 906 may optionally be stored onstorage device 910 either before or after execution by computer hardwareprocessor(s) 904.

The time series service 100 also includes a communication interface 918coupled to bus 902. Communication interface 918 provides a two-way datacommunication coupling to a network link 920 that is connected to alocal network 922. Wireless links may also be implemented. In any suchimplementation, communication interface 918 sends and receiveselectrical, electromagnetic or optical signals that carry digital datastreams representing various types of information.

Network link 920 typically provides data communication through one ormore networks to other data devices. For example, network link 920 mayprovide a connection through local network 922 to a host computer 924 orto data equipment operated by an Internet Service Provider (ISP) 926.ISP 926 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 928. Local network 922 and Internet 928 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 920and through communication interface 918, which carry the digital data toand from the time series service 100, are example forms of transmissionmedia.

A network, such as the network 160 of FIG. 1 , may comprise, but is notlimited to, one or more local area networks, wide area network, wirelesslocal area network, wireless wide area network, the Internet, or anycombination thereof.

The time series service 100 can send messages and receive data,including program code, through the network(s), network link 920 andcommunication interface 918. In the Internet example, a server 930 mighttransmit a requested code for an application program through Internet928, ISP 926, local network 922 and communication interface 918.

The received code may be executed by processor(s) 904 as it is received,and/or stored in storage device 910, or other non-volatile storage forlater execution.

In some embodiments, the time series service 100 and/or the usercomputing device 102 may operate in a distributed computing environmentincluding several computer systems that are interconnected using one ormore computer networks. The time series service 100 and/or the usercomputing device 102 could also operate within a computing environmenthaving a fewer or greater number of devices than are illustrated in FIG.1 and/or FIG. 9 . Thus, the depiction of time series service 100 and/orthe user computing device 102 in FIG. 1 and/or FIG. 9 should be taken asillustrative and not limiting to the present disclosure. For example,the time series service 100 and/or the user computing device 102 couldimplement various Web services components and/or peer-to-peer networkconfigurations to implement at least a portion of the processesdescribed herein. For example, multiple servers and/or processes mayprocess and/or analyze items and/or present a user interface in adistributed manner, as described herein.

Each of the processes, methods, and algorithms described in thepreceding sections may be embodied in, and fully or partially automatedby, code instructions executed by one or more computer systems orcomputer processors comprising computer hardware. The processes andalgorithms may be implemented partially or wholly inapplication-specific circuitry.

The various features and processes described above may be usedindependently of one another, or may be combined in various ways. Allpossible combinations and subcombinations are intended to fall withinthe scope of this disclosure. In addition, certain method or processblocks may be omitted in some implementations. The methods and processesdescribed herein are also not limited to any particular sequence, andthe blocks or states relating thereto can be performed in othersequences that are appropriate. For example, described blocks or statesmay be performed in an order other than that specifically disclosed, ormultiple blocks or states may be combined in a single block or state.The example blocks or states may be performed in serial, in parallel, orin some other manner. Blocks or states may be added to or removed fromthe disclosed example embodiments. The example systems and componentsdescribed herein may be configured differently than described. Forexample, elements may be added to, removed from, or rearranged comparedto the disclosed example embodiments.

Conditional language, such as, among others, “can,” “could,” “might,” or“may,” unless specifically stated otherwise, or otherwise understoodwithin the context as used, is generally intended to convey that certainembodiments include, while other embodiments do not include, certainfeatures, elements and/or steps. Thus, such conditional language is notgenerally intended to imply that features, elements and/or steps are inany way required for one or more embodiments or that one or moreembodiments necessarily include logic for deciding, with or without userinput or prompting, whether these features, elements and/or steps areincluded or are to be performed in any particular embodiment.

The term “a” as used herein should be given an inclusive rather thanexclusive interpretation. For example, unless specifically noted, theterm “a” should not be understood to mean “exactly one” or “one and onlyone”; instead, the term “a” means “one or more” or “at least one,”whether used in the claims or elsewhere in the specification andregardless of uses of quantifiers such as “at least one,” “one or more,”or “a plurality” elsewhere in the claims or specification.

The term “comprising” as used herein should be given an inclusive ratherthan exclusive interpretation. For example, a general purpose computercomprising one or more processors should not be interpreted as excludingother computer components, and may possibly include such components asmemory, input/output devices, and/or network interfaces, among others.

Any process descriptions, elements, or blocks in the flow diagramsdescribed herein and/or depicted in the attached figures should beunderstood as potentially representing units, segments, or portions ofcode which include one or more executable instructions for implementingspecific logical functions or steps in the process. Alternateimplementations are included within the scope of the embodimentsdescribed herein in which elements or functions may be deleted, executedout of order from that shown or discussed, including substantiallyconcurrently or in reverse order, depending on the functionalityinvolved, as would be understood by those skilled in the art.

It should be emphasized that many variations and modifications may bemade to the above-described embodiments, the elements of which are to beunderstood as being among other acceptable examples. All suchmodifications and variations are intended to be included herein withinthe scope of this disclosure. The foregoing description details certainembodiments of the invention. It will be appreciated, however, that nomatter how detailed the foregoing appears in text, the invention can bepracticed in many ways. As is also stated above, it should be noted thatthe use of particular terminology when describing certain features oraspects of the invention should not be taken to imply that theterminology is being re-defined herein to be restricted to including anyspecific characteristics of the features or aspects of the inventionwith which that terminology is associated. The scope of the inventionshould therefore be construed in accordance with the appended claims andany equivalents thereof.

1. (canceled)
 2. A computing system comprising: a non-transitorycomputer storage medium configured to store metadata associated withtime series; and one or more hardware computer processors programmed,via executable code instructions, to cause the computing system to:receive a time series expression to be applied to a first time seriesand a second time series; determine a first time unit associated withthe first time series; determine a second time unit associated with thesecond time series, wherein the first time unit is different from thesecond time unit; determine a first interpolation operation to apply toat least a first portion of the first time series; apply the firstinterpolation operation to the first portion of the first time series togenerate an interpolated first time series; and apply the time seriesexpression to the interpolated first time series and the second timeseries.
 3. The computing system of claim 2, wherein the one or morehardware computer processors are programmed, via the executable codeinstructions, to cause the computing system to: determine the first timeunit from first metadata associated with the first time series; anddetermine the second time unit from second metadata associated with thesecond time series.
 4. The computing system of claim 2, wherein the oneor more hardware computer processors are programmed, via the executablecode instructions, to cause the computing system to: determine that thefirst time unit and the second time unit are different.
 5. The computingsystem of claim 4, wherein the one or more hardware computer processorsare programmed, via the executable code instructions, to cause thecomputing system to: determine to apply the first interpolationoperation in response to determining that the first time unit and thesecond time unit are different.
 6. The computing system of claim 2,wherein applying the first interpolation operation comprises:identifying a first set of timestamps from the first time series and asecond set of timestamps from the second time series; determining, basedon the first and second sets of timestamps, a set of common timestamps;and generating the interpolated first time series based on the set ofcommon timestamps.
 7. The computing system of claim 6, wherein the setof common timestamps comprises a time unit matching second time unit. 8.The computing system of claim 2, wherein the one or more hardwarecomputer processors are programmed, via the executable codeinstructions, to cause the computing system to: apply a secondinterpolation operation to a second portion of the first time series togenerate the interpolated first time series.
 9. The computing system ofclaim 8, wherein types of the respective first and second interpolationoperations are based on characteristics of the respective first andsecond portions of the first time series.
 10. The computing system ofclaim 2, wherein the first interpolation operation comprises at leastone of: a none interpolation operation, a nearest interpolationoperation, a previous interpolation operation, a next interpolationoperation, a linear interpolation operation, or a polynomialinterpolation operation.
 11. The computing system of claim 2, whereindetermining the first interpolation operation is based on receiving oneor more interpolation configuration parameters.
 12. The computing systemof claim 2, wherein the one or more hardware computer processors areprogrammed, via the executable code instructions, to cause the computingsystem to: determine a granularity of the first and second time seriesis different; and apply normalization operation to at least a portion ofat least one of the first time series or the second time series.
 13. Thecomputing system of claim 12, wherein applying the normalizationoperation comprises applying a scaling function to timestamps of the atleast one of the first time series or the second time series.
 14. Acomputerized method, performed by a computing system having one or morehardware computer processors and one or more non-transitory computerreadable storage device storing software instructions executable by thecomputing system to perform the computerized method, the computerizedmethod comprising: receiving a time series expression to be applied to afirst time series and a second time series; determining a first timeunit associated with the first time series; determining a second timeunit associated with the second time series, wherein the first time unitis different from the second time unit; determining a firstinterpolation operation to apply to at least a first portion of thefirst time series; applying the first interpolation operation to thefirst portion of the first time series to generate an interpolated firsttime series; and applying the time series expression to the interpolatedfirst time series and the second time series.
 15. The computerizedmethod of claim 14 further comprising: determining the first time unitfrom first metadata associated with the first time series; anddetermining the second time unit from second metadata associated withthe second time series.
 16. The computerized method of claim 14 furthercomprising: determining that the first time unit and the second timeunit are different.
 17. The computerized method of claim 16 furthercomprising: determining to apply the first interpolation operation inresponse to determining that the first time unit and the second timeunit are different.
 18. The computerized method of claim 14, whereinapplying the first interpolation operation comprises: identifying afirst set of timestamps from the first time series and a second set oftimestamps from the second time series; determining, based on the firstand second sets of timestamps, a set of common timestamps; andgenerating the interpolated first time series based on the set of commontimestamps.
 19. The computerized method of claim 18, wherein the set ofcommon timestamps comprises a time unit matching second time unit. 20.The computerized method of claim 14 further comprising: applying asecond interpolation operation to a second portion of the first timeseries to generate the interpolated first time series.
 21. Thecomputerized method of claim 20, wherein types of the respective firstand second interpolation operations are based on characteristics of therespective first and second portions of the first time series.